package cn.diancan.model.types;

 

public enum TranPayInterfaceType {
    
    // 1.系统充值  2.钱包  3.支付宝快捷支付接口  4.微信APP支付   5.微信网页支付
    
    /**
     * 未知 0
     */
    UNKNOWPAY(0,"未知"),
    /**
     * 系统充值 1
     */
    SYSRECHARGE(1,"系统充值"),
    /**
     * 钱包  2
     */
    WALLET(2,"钱包"),
    /**
     * 支付宝快捷支付   3
     */
    ALIPAYFAST(3,"支付宝快捷支付"),
    /**
     * 微信APP支付 4
     */
    WXAPP(4,"微信APP支付"),
    /**
     * 微信JS支付，为了让用户懂， 写成微信网页支付
     */
    WXJS(5,"微信网页支付");
    
    
    private TranPayInterfaceType(Integer payType,String description){
	this.payType =payType;
	this.description =description;
    }
    /**
     * 检查值是否存在
     * @param type
     * @return
     */
    public static boolean checkExists(Integer type){
	if(null==type){
	    return false;
	}
	TranPayInterfaceType enums[] =TranPayInterfaceType.values();
	for (int i = 0; i < enums.length; i++) {
	    TranPayInterfaceType singleEnum=  enums[i];
	    if(singleEnum.getPayType().equals(type)){
		return true;
	    }
	}
	return false;
    }
    
    private Integer payType;
    private String description;
    
    public Integer getPayType() {
        return payType;
    }
    public String getDescription() {
        return description;
    }  
    
    
}
